<table border="0" align="center">
<tr>
<td>
<center>Site Information</center><hr>
<label>Site Name</label>
<form method="post">
<input name="site_name" type="text">
</td>
</tr>
<tr>
<td>
<label>Site Motto: </label><input name="site_motto" type="text">
</td>
</tr>
<tr>
<td>
<label>Site URL: </label><input name="site_url" type="text">
</td>
</tr>
<tr>
<td>
<label>Site Footer: </label><input name="site_foot" type="text">
</td>
</tr>
<tr>
<td>
<br>
<div align="center"><input type="submit" name="submit" value="Submit"></div> 
</td>
</tr>
</table>
<?php
if ($submit == "Submit")
{
$site_name = $_POST['site_name'];
$site_motto = $_POST['site_motto'];
$site_url = $_POST['site_url'];
$site_foot = $_POST['site_foot']; 
$submit = $_POST['submit'];
$admin_name = $_POST['admin_name'];
$admin_user = $_POST['admin_user'];
$admin_pass = $_POST['admin_pass'];
$sql_user = $_POST['sql_user'];
$sql_pass = $_POST['sql_pass'];
$sql_db = $_POST['sql_db'];
$sql_server = $_POST['sql_server'];
$fp = fopen("../includes/db.php", "w"); 
$content ="<?php
mysql_connect($sql_server, $sql_user, $sql_pass);
mysql_select_db($sql_db);
?>
";

fwrite($fp, $content); 
fclose($fp);
include("../includes/db.php");
$password = md5($admin_pass);
$query1 = "CREATE TABLE `users` (
`id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
`username` TEXT NOT NULL ,
`password` TEXT NOT NULL ,
`name` TEXT NOT NULL ,
`location` TEXT NOT NULL ,
`status` INT NOT NULL
)";

$query2 = "CREATE TABLE `config` (
`site_name` TEXT NOT NULL PRIMARY KEY ,
`site_motto` TEXT NOT NULL ,
`site_foot` TEXT NOT NULL 
`site_url` TEXT NOT NULL 
)";

$query3 = "CREATE TABLE `news` (
`id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
`title` TEXT NOT NULL ,
`message` TEXT NOT NULL 
`date` TEXT NOT NULL,
`author` TEXT NOT NULL 
)";

$query4 = "INSERT INTO users VALUES ('', '$admin_user', '$password', '$admin_name', '', '2')";
mysql_query($query1) or die(mysql_error());
mysql_query($query2) or die(mysql_error());
mysql_query($query3) or die(mysql_error());
mysql_query($query4) or die(mysql_error());
echo "Install Completed Successfully! <a href='../login.php'>Click Here</a> To Login.";
}
?>
